package com.study.demo_cors1.controller;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: HelloController
 * @Description:
 * @author: WS
 * @date 2020/12/12
 * @Version: 1.0
 **/
@RestController
public class HelloController {
    @GetMapping("/hello")
//    @CrossOrigin(origins = "http://localhost:8081")
    public String sayHello(){
        return "Hello CORS";
    }
    @PutMapping("/hello")
    public String putHello(){
        return "Hello PutHello";
    }
}
